]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
layout: Explicitly destroy hot corners on shutdown
authorJonas Ådahl <jadahl@gmail.com>
Thu, 2 Feb 2023 14:50:43 +0000 (15:50 +0100)
committerMarge Bot <marge-bot@gnome.org>
Mon, 6 Feb 2023 18:10:01 +0000 (18:10 +0000)
This won't be handled by our existing actor destruction path as the
ripple actors are added directly to the stage and not the uiGroup.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2623>

js/ui/layout.js

index 090295f0f3a34d901ee07c60b65731076b201d09..ed09c8f83bcb4920f472f48ebba9dc62ec143ad5 100644 (file)
@@ -236,6 +236,7 @@ var LayoutManager = GObject.registerClass({
                 global.stage.add_actor(adoptedActor);
             }
 
+            this._destroyHotCorners();
             this.uiGroup.destroy();
         });
 
@@ -415,13 +416,14 @@ var LayoutManager = GObject.registerClass({
         }
     }
 
+    _destroyHotCorners() {
+        this.hotCorners.forEach(corner => corner?.destroy());
+        this.hotCorners = [];
+    }
+
     _updateHotCorners() {
         // destroy old hot corners
-        this.hotCorners.forEach(corner => {
-            if (corner)
-                corner.destroy();
-        });
-        this.hotCorners = [];
+        this._destroyHotCorners();
 
         if (!this._interfaceSettings.get_boolean('enable-hot-corners')) {
             this.emit('hot-corners-changed');